pp108 : addItem() Method (Toolbar)

addItem() Method (Toolbar)


This method adds an item to the toolbar.

Syntax

toolbarID.addItem(oToolbarButton);

Parameters

Parameter

Description

oToolbarButton

Required. JavaScript object that helps create a toolbar button. This object comprises the following properties:

  • id: Refers to the unique ID of the toolbar button.
  • caption: Refers to the string that is to be displayed as text of the toolbar button.
  • imageURL: Refers to the URL of the image to be used as the button's image.
  • onclick: Refers to the function pointer used as the onclick handler.
  • title: Refers to the string that is used as tooltip.
  • buttonType: Refers to the type of button.
  • dropdownClick: Refers to the function pointer that is used as the onclick handler for a dropdown button.
  • accessKey: Refers to the character that denotes the accessKey for the toolbar item. (This is a standard HTML property).


Return Value


Returns the Button object.

See Also


toolbar